﻿using Bricks.Component.Utils;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;

namespace Bricks.Business.Models.ExpenseManagement
{
    [Description("标段费用付款过程数据")]
    public class ExpenseBackup : EntityBase<Guid>
    {
        public ExpenseBackup()
        {
            ID = GuidHelper.NewGuid();
        }

        [Required]
        [StringLength(255)]
        [Description("流程编码")]
        public string FlowCode { get; set; }

        public Guid ExpenseID { get; set; }

        [Display(Name = "项目ID")]
        public Guid ProjectID { get; set; }

        [Display(Name = "标段ID")]
        public Guid ContractID { get; set; }

        [Display(Name = "合同来源")]
        public string ContractSource { get; set; }

        public int ExpenseNum { get; set; }

        public decimal? RequestMoneyForRequestPerson { get; set; }

        public string RequestPerson { get; set; }

        /// <summary>
        /// 申请金额
        /// </summary>
        public decimal? ApprovalMoney { get; set; }

        /// <summary>
        /// 期次--add by luozx
        /// </summary>
        public int? ContractStages { get; set; }

        public DateTime RequestDate { get; set; }

        public string RequeatReason { get; set; }

        public string Attachment { get; set; }

        public string PayNum { get; set; }

        //流转状态：
        //0：申请；1：流转；2：结束；3：终止；4：回退
        [Required]
        [StringLength(1)]
        public string HandleState { get; set; }

        public string AssociatedNodeCode { get; set; }

        public string LastUpdateUserDepartment { get; set; }

        public string LastUpdateUser { get; set; }

        public DateTime? LastUpdateTime { get; set; }

        //保存状态，为了判断是否能回退，只要点了保存按钮就更新这个字段为“1”
        public string SaveState { get; set; }

        //发送状态：为了在单据完成或者终止的时候删除没有发送的数据（没有发送的情况可能是一个节点有多个人，但是之间是or的关系或者多个or关系的节点）
        public string SendState { get; set; }
    }
}
